<?php 
$lmxx="select * from $tb_bm where isindex='-1'";
$lm_conn=mysql_query($lmxx);
?>
<link href="../images/bj.css" rel="stylesheet" type="text/css" />
<table width="780" border="0" >
<tr>
  <?php 
  $i=2;
  while($lm_row=mysql_fetch_array($lm_conn)){  
  $detailsql="select * from $tb_dz where buid='".$lm_row[id]."' and `isdel`='0' order by tdate desc limit 7 ";
  $detailconn=mysql_query($detailsql);  
  ?>  
    <td width="380">
	
	<table width="378" height="200" border="0" background="images/lanmubg.jpg">
      <tr>
        <td width="58" height="26" class="dttext">&nbsp;</td>
        <td width="10" class="dttext">&nbsp;</td>
        <td width="298" height="40" valign="middle" class="dttext"><a href='show_dzxx.php?nname=<?php echo $lm_row[id] ?>' target='_blank'><?php echo $lm_row[buname] ?></a></td>
      </tr>
      <tr>
        <td colspan="2" class="dttext">&nbsp;</td>
        <td height="140" align="left" valign="top" class="indexlmtext">
		<?php 
		  while($detail_row=mysql_fetch_array($detailconn)){
		  
		  	/*if(strlen($detail_row[pic])>25) $msg="<font color=\"red\">[图片]</font>";
		else $msg="";*/
			if(strlen($detail_row[title])>35){
			echo "&middot;".$msg."<a href='detailshow.php?id=$detail_row[id]' target='_blank' title='标题：".$detail_row[title]." &#13;&#10;录入：".$detail_row[author]."&#13;&#10;日期：".$detail_row[tdate]."'>";
			
			echo  substr_cut($detail_row[title],33)."</a>";
		}
else{
echo "&middot;".$msg."<a href='detailshow.php?id=$detail_row[id]'  target='_blank' title='标题：".$detail_row[title]." &#13;&#10;录入：".$detail_row[author]."&#13;&#10;日期：".$detail_row[tdate]."'>";
echo "".$detail_row[title]."</a>";

	}
		
	echo  " ".shortdate($detail_row[tdate])."<br>";	
		
		}
		?></td>
      </tr>
    </table>
	</td>
    
	<?php if($i%2==0) echo "<td width=\"20\" class=\"dttext\">&nbsp;</td>";
	else echo "</tr><tr>";	
	
  $i++;
  }?></tr>
</table>
